package com.nowcodercommunity.service;

import com.nowcodercommunity.dao.DiscussPostMapper;
import com.nowcodercommunity.entity.DiscussPost;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiscussPostService {

    @Autowired
    private DiscussPostMapper discussPostMapper;

    public List<DiscussPost> selectDiscussPosts( int userId,  int offset,  int limit ){
         return discussPostMapper.selectDiscussPosts(userId, offset, limit);
    }

   public int selectDiscussPostRows(int userId){
        return discussPostMapper.selectDiscussPostRows(userId);
   }

}
